Skip to content

)}

Notification.Equals(Notification?) method

Defined in

Type: Notification Namespace: System.Reactive Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public abstract bool Equals(Notification<T>? other)
  • 2. public override bool Equals(object? obj)

1. Overload

public abstract bool Equals(Notification<T>? other)

Summary: Determines whether the current Notification object has the same observer message payload as a specified Notification value.

Parameters

NameTypeDescription
other[Notification?](#An object to compare to the current [Notification](# object.

Returns: bool -- true if both Notification objects have the same observer message payload; otherwise, false.

Remarks

Equality of Notification objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification objects represent the same observer method call, use Object.ReferenceEquals identity equality instead.

2. Overload

public override bool Equals(object? obj)

Summary: Determines whether the specified System.Object is equal to the current Notification.

Parameters

NameTypeDescription
objobject?The System.Object to compare with the current [Notification](#

Returns: bool -- true if the specified System.Object is equal to the current Notification; otherwise, false.

Remarks

Equality of Notification objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification objects represent the same observer method call, use Object.ReferenceEquals identity equality instead.